<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" 
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4" 
      lang="cn">
  <head>
    <meta charset="UTF-8">
    <title>选择参数</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    
     <link rel="shortcut icon" th:href="@{/favicon.ico}" type="image/x-icon" />
     <link rel="stylesheet" th:href="@{/jstree/themes/default/style.min.css}" />
    <link rel="stylesheet" th:href="@{/css/font-awesome.min.css}">
	<link rel="stylesheet" th:href="@{/css/xadmin.css}">
	<script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{/layui/layui.js}" charset="utf-8"></script>
    <script type="text/javascript" th:src="@{/js/xadmin.js}"></script>
    <script type="text/javascript" th:src="@{/js/common.js}"></script>
    <script type="text/javascript" th:src="@{/js/para-sel.js}"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script th:src="@{/js/html5shiv.min.js}"></script>
      <script th:src="@{/js/respond.min.js}"></script>
    <![endif]-->
	<style>
	 .layui-form-radio{margin:0;}
	 </style>
  </head>
  
  <body>
   <input type="hidden" id="index" th:attr="value=${index}"/>
   <input type="hidden" id="operateData" th:attr="value=${operateData}"/>
   <input type="hidden" id="operateRule" th:attr="value=${operateRule}"/>
   <input type="hidden" id="selectType" th:attr="value=${selectType}"/>
    <div class="x-body">
	    <div class="layui-form">
			<div class="layui-form-item">
					  <label for="paraFrom" class="layui-form-label">来源方式</label>
					  <div class="layui-input-block">
						 <select lay-filter="para-from" id="paraFrom"><option value="1">脚本自定义</option><option value="2">数据集</option></select>
					  </div>
			 </div>
			 <div class="layui-form-item" th:if="${selectType == 2}">
					  <label for="operateReadRule" class="layui-form-label" >取数规则</label>
					  <div class="layui-input-block" >
						  <input type="radio" name="operateReadRule" value="1" title="顺序" checked="">
						  <input type="radio" name="operateReadRule" value="2" title="随机">
						  <input type="radio" name="operateReadRule" value="3" title="唯一">
					  </div>
			</div>
		</div>
  
        <div class="layui-row"  id="para-div" style="width:100%;border:1px solid #ddd;">
			<div class="layui-col-md7">
				<div class="layui-row" style="height:260px;border-right:1px solid #ddd;margin-right:5px;overflow-y:auto;">
				    <div class="layui-col-md12" style="text-align:center;line-height:50px;">
					  <cite style="font-family: 'PingFangSC-Regular', 'PingFang SC';font-weight: 400;font-style: normal;font-size: 18px;">新增变量名</cite>
					</div>
				   
					<div class="layui-col-md12" >
						<div name="paradiv" id="newpara" class="layui-form" style="margin-right:20px;">
						    <div class="layui-form-item">
							    <label for="paraName" class="layui-form-label" >参数名:</label>
							    <div class="layui-input-inline">
								  <input type="text" id="paraName" autocomplete="off" class="layui-input" maxlength="10">
							    </div>
							</div>
							<!-- 期望结果不显示 -->
							<div class="layui-form-item" th:if="${selectType == 2}">
							    <label for="reuseType" class="layui-form-label" >是否可重用:</label>
							    <div class="layui-input-inline">
								  <input type="radio" name="reuseType" value="1" title="是" checked=""/>
								  <input type="radio" name="reuseType" value="2" title="否" />
							    </div>
							</div>
							 <div class="layui-form-item" id="cloneObj">
							    <label for="paraData" class="layui-form-label" >参数值:</label>
							    <div class="layui-input-inline">
								  <input type="text" name="paraData" autocomplete="off" class="layui-input" maxlength="30">
							    </div>
								 <div class="layui-form-mid layui-word-aux">
								  <i class="layui-icon" style="cursor:pointer;" onclick="addParaVal(this)">&#xe654;</i>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-col-md5">
			<input type="hidden" id="selPara"/>
				<div class="layui-row" style="height:260px;overflow-y:auto;">
				    <div class="layui-col-md12" style="text-align:center;line-height:50px;">
					  <cite style="font-family: 'PingFangSC-Regular', 'PingFang SC';font-weight: 400;font-style: normal;font-size: 18px;">已定义变量名</cite>
					</div>
					<div class="layui-col-md12">
					  <div class="layui-form" name="paradiv" id="oldPara">
					     <div class="layui-form-item">
						  <div class="layui-inline">
							  <label class="layui-form-label">已定义变量</label>
							  <div class="layui-input-inline">
								<select name="sel" lay-filter="oldpara-sel" lay-search="" id="sel">
								  <option value="">直接选择或搜索选择</option>
								  
								</select>
							  </div>
						  </div>
						</div>
					  </div>
					
					</div>
				<div>
			</div>
	    </div>
    </div>  
</div>	
 <div class="layui-row"  id="dataset-div" style="display:none;width:100%;min-height:300px;border:1px solid #ddd;">
    <div class="layui-col-md7"  style="height:100%;min-height:300px;max-height:600px;overflow-y:auto;" >
				<div class="layui-row" style="margin-right:5px;">
				    <div class="layui-col-md12" style="text-align:center;line-height:50px;">
					  <cite style="font-family: 'PingFangSC-Regular', 'PingFang SC';font-weight: 400;font-style: normal;font-size: 18px;">已定义数据集</cite>
					</div>
				   
					<div class="layui-col-md12" >
						<div class="layui-form">
					     <div class="layui-form-item">
						  <div class="layui-inline">
							  <label class="layui-form-label">已定义数据集</label>
							  <div class="layui-input-inline">
								<select name="dataset-sel" lay-filter="dataset-sel" lay-search="" id="dataset-sel">
								  <option value="">直接选择或搜索选择</option>
								  
								</select>
							  </div>
						  </div>
						</div>
					  </div>
					</div>
				</div>
			</div>
			<div class="layui-col-md5" style="height:100%;min-height:300px;max-height:600px;overflow-y:auto;border-left:1px solid #ddd;">
				<div class="layui-row">
				    <div class="layui-col-md12" style="text-align:center;line-height:50px;">
					  <cite style="font-family: 'PingFangSC-Regular', 'PingFang SC';font-weight: 400;font-style: normal;font-size: 18px;">已定义变量参数</cite>
					</div>
					<div class="layui-col-md12" style="max-height:500px;overflow-y:auto;">
					   <div class="layui-form">
						    <div class="layui-collapse" id="dataset-para">
							</div>
						</div>
					
					</div>
	    </div>
    </div>  
 </div>
 <div class="layui-form-item" style="text-align:center;margin-top:10px;">
			<button id="save-btn"  class="layui-btn"  type="button">
			 <i class="fa fa-floppy-o" style="margin-right:10px;"></i>确定
			</button>
  </div>
</div>
</body>
</html>